package com.isoft.controller.sys;

import com.isoft.bean.Result;
import com.isoft.entity.CounterDynamics;
import com.isoft.entity.PageBean;
import com.isoft.service.impl.CounterDynamicsService;
import com.isoft.util.ReturnCountertData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@CrossOrigin
@RestController
@RequestMapping("/Counter")
public class CounterDynamicsController {
    @Autowired
    CounterDynamicsService counterDynamicsService;
            //动态值机柜台信息显示
    @GetMapping("/getCounterDynamics")
    public Result page(@RequestParam(defaultValue = "1") Integer page ,
                       @RequestParam(defaultValue = "10") Integer pageSize)
    {
        log.info("分页查询 ：{},{}" , page , pageSize);
        PageBean pageBean = counterDynamicsService.selectCounterDynamics(page , pageSize);
        return Result.success(pageBean);
    }
}
